package com.sky.Constructor;

public class Test {
    //掌握构造器,构造器一般用于初始化对象
    public static void main(String[] args) {
    Student s1 = new Student();     //执行无参数构造器
    Student s2 = new Student("sky", 100.0); //执行有参数构造器
        System.out.println(s2.name);
        System.out.println(s2.score);

        Teacher t = new Teacher();
    }
}
